package com.zhiyou.wisdom.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zhiyou.wisdom.mapper.Schema1Mapper;
import com.zhiyou.wisdom.pojo.Schema1;
import com.zhiyou.wisdom.pojo.Schema1Example;
import com.zhiyou.wisdom.pojo.Schema1Example.Criteria;
import com.zhiyou.wisdom.service.SchemaService;
@Service
public class SchemaServiceImpl implements SchemaService {
	@Autowired
	private Schema1Mapper schemaMapper;
		
	@Override
	public List<Schema1> selectByExample(int userId) {
		// TODO Auto-generated method stub
		Schema1Example example=new Schema1Example();
		Criteria cri = example.createCriteria();
		cri.andSUserIdEqualTo(userId);
		return schemaMapper.selectByExample(example);
	}

	@Override
	public int insert(Schema1 record) {
		// TODO Auto-generated method stub
		return schemaMapper.insert(record);
	}

	@Override
	public int updateByExample(Schema1 record) {
		return schemaMapper.updateByUserIdSelective(record);
	}
	
	

}
